package com.semanticweb.webapp.model.ontology;

import org.apache.lucene.document.Document;

import com.semanticweb.webapp.ontology.CIDOC;
import com.semanticweb.webapp.ontology.CType;
import com.semanticweb.webapp.ontology.Ont;
import com.semanticweb.webapp.ontology.OntHelper;
import com.semanticweb.webapp.search.IDocument;

/**
 * Class which represents 'Broj knjige ulaza' from the chart.
 * 
 * @author Lab
 * 
 */
public class NumberInEntranceBook extends DefaultAbstractEntity<String> implements IDocument {

    public static final String ONT_NUMBER_IN_ENTRANCE_BOOK = "nieb";

    public NumberInEntranceBook(final String id) {
        super(id);
    }

    @Override
    public void toRDF() {
        OntHelper.toRDFValueWithType(this.id, CIDOC.P48, CIDOC.E42, this.value,
                Ont.formatURIPart(ONT_NUMBER_IN_ENTRANCE_BOOK), CType.NUMBER_IN_ENTRANCE_BOOK);
    }

    public void fromRDF() {
        this.value = OntHelper.fromRDFValueWithType(this.id, CIDOC.P48, CIDOC.E42, CType.NUMBER_IN_ENTRANCE_BOOK);
    }

    @Override
    public void toIndexDocument(final Document doc) {
        // Nothing to index
    }

}
